#include <machine/asm.h>

ENTRY(strcpy)
	movl	8(%sp),%a0		| a0 = fromaddr
	movl	4(%sp),%d0		| return value is toaddr
	movl	%d0,%a1			| a1 = toaddr
.Lscloop:
	movb	(%a0)+,(%a1)+		| copy a byte
	jne	.Lscloop		| copied non-null, keep going
#ifdef __SVR4_ABI__
	moveal	%d0,%a0
#endif
	rts
END(strcpy)
